package com.example.springboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springboot.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @Author: ShanYuqing
 * @Version: v1.0
 */
public interface UserMapper extends BaseMapper<User> {
//    @Select("select * from user")
//    List<User> findAll();
//
//    @Insert("insert into user(username,password,nickname,email,phone,address) VALUES (#{username},#{password},#{nickname},#{email},#{phone},#{address})")
//    int insert(User user);
//
//    int update(User user);
//
//    @Delete("delete from user where id=#{id}")
//    Integer delete(@Param("id") Integer id);
//
//    @Select("select * from user where username like #{username}   limit ${pageNum}, ${pageSize}")
//    List<User> selectPage(@Param("pageNum") Integer pageNum,@Param("pageSize") Integer pageSize,@Param("username") String username);
//
//    @Select("select count(*) from user  where username like #{username}  ")
//    Integer selectTotal(String username );
}
